<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src='../angular-1.5.8/angular.js'></script>
</head>
<body>
    <div ng-app="mainApp" ng-controller="one" >
        <div>{{price}}</div>
    </div>
</body>
<script>
// 使用过滤器
//过滤器的语法是在控制器函数的参数第二个是过滤器
    angular.module('mainApp',[])
            .controller('one',function ($scope,$filter){
                //返回值是函数
                var currencyFn=$filter('currency');
                $scope.price=currencyFn(123);
            })
</script>
</html>